package com.example.douyin.controller;

import com.example.douyin.service.WatermarkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

@RestController
@RequestMapping("/watermark")
@Api(tags = "抖音去水印", description = "抖音去水印")
public class WatermarkController {

    @Autowired
    private WatermarkService watermarkService;


    @PostMapping("/getBgmAndMusic")
    @ApiOperation(value = "下载BGM,MUSIC的请求接口", notes = "下载BGM,MUSIC的请求接口")
    public void getBgmAndMusic(@RequestParam(name = "shortUrls") @ApiParam(required = true,name = "shortUrls", example = "https://v.douyin.com/heQxxeG/") List<String> shortUrl, HttpServletResponse response) throws Exception {
        watermarkService.getBgmAndMusic(shortUrl, response);
    }
}